﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="XYTXL.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <title>欢迎登录无锡职业技术学院校友管理系统</title>
    <!--[if lte IE 9]>
    <div id="warning_info" class="text-warning fade in mb_0">
        <button data-dismiss="alert" class="close" type="button">×</button>
        <strong>您还在使用低版本浏览器，赶紧升级到最近版本的浏览器,体验效果更佳</strong> 
        <a href="http://windows.microsoft.com/en-us/internet-explorer/download-ie" target="_blank">
            Internet Explorer 10</a>
    </div>
    <![endif]-->
    <link href="/View/CSS/login.css" rel="stylesheet" />
    <script src="/View/JS/jquery-1.11.2.min.js"></script>
    <script type="text/javascript">

        $(function () {
            $('.loginbox').css({ 'position': 'absolute', 'left': ($(window).width() - 692) / 2 });
            $(window).resize(function () {
                $('.loginbox').css({ 'position': 'absolute', 'left': ($(window).width() - 692) / 2 });
            })
            if (top != self) {
                if (top.location != self.location)
                    top.location = self.location;
            }
            $("#username").val(getCookie('username'))
            $("#userpasd").val(getCookie('userpasd'))

            getcode();

        });
        function adduserinfon() {
            if ($("#isJZMM")[0].checked) {
                addCookie('username', $("#username").val(), 2000)
                addCookie('userpasd', $("#userpasd").val(), 2000)
            }
        }
        function addCookie(objName, objValue, objHours) {//添加cookie
            var str = objName + "=" + escape(objValue);
            if (objHours > 0) {//为0时不设定过期时间，浏览器关闭时cookie自动消失
                var date = new Date();
                var ms = objHours * 3600 * 1000;
                date.setTime(date.getTime() + ms);
                str += "; expires=" + date.toGMTString();
            }
            document.cookie = str;
        }

        function getCookie(objName) {//获取指定名称的cookie的值
            var arrStr = document.cookie.split("; ");
            for (var i = 0; i < arrStr.length; i++) {
                var temp = arrStr[i].split("=");
                if (temp[0] == objName) return unescape(temp[1]);
            }
        }
        function getcode() {
            $.getJSON("/API/VIEWAPI.ashx?Action=CHKCODE&r=" + Math.random(), {  }, function (r) {
                if (r.ErrorMsg == "") {
                    $("cite").text(r.Result);
                }
            });
        }
        
    </script>

</head>
<body style="background-color: #1c77ac; background-image: url(images/light.png); background-repeat: no-repeat; background-position: center top; overflow: hidden;">
    <form id="form1" runat="server">
        <div id="mainBody">
            <div id="cloud1" class="cloud"></div>
            <div id="cloud2" class="cloud"></div>
        </div>
        <div class="logintop">
            <span>欢迎登录信息发布展示平台系统</span>

        </div>

        <div class="loginbody" style="top: 160px">

            <span style="text-align: center">

                <span style="display: inline; color: whitesmoke; font-size: 30px; margin-left: 20px; vertical-align: bottom;">欢迎登录信息发布展示平台系统</span>
            </span>

            <div class="loginbox">

                <ul>
                    <li>
                        <input id="username" type="text" class="loginuser" runat="server" autocomplete='off' /></li>
                    <li>
                        <input id="userpasd" type="password" class="loginpwd" runat="server" autocomplete='off' /></li>
                    <li class="yzm" style="margin-bottom:10px">
                        <span><input id="code" runat="server" type="text" /></span><cite onclick="getcode()"></cite>
                    </li>
                    <li>
                        <asp:Button ID="btLogin" runat="server" Text="登录" class="loginbtn" OnClientClick="adduserinfon()" OnClick="btLogin_Click" />
                        <label for="isJZMM">
                            <input type="checkbox" id="isJZMM" checked="checked" style="margin-right: 0; vertical-align: middle" />
                            记住密码</label>
                        <asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label>
                    </li>
                </ul>


            </div>

        </div>
        <%--<div class="loginbm">河南幻境数字科技有限公司 版权所有<span id="bowversion"></span></div>--%>
    </form>
</body>
</html>
